package com.jx.dao;

import com.jx.entity.Classes;
import com.jx.mapper.ClassesMapper;
import com.jx.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.io.IOException;
import java.util.List;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
public class ClassesDao {
	// 1. 查询所有班级
	public List<Classes> findAll() throws IOException {
		try(SqlSession session = MybatisUtil.getSqlSession(true)) {
			ClassesMapper classesMapper = session.getMapper(ClassesMapper.class);
			return classesMapper.findAll();
		}
	}
}
